<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        
<title><?php echo $this->title?></title>

<?php Helpers::yiiCss(array('admin_assets/css/zice.style.css',
							'admin_assets/css/icon.css', 
							'admin_assets/css/ui-custom.css',
							'admin_assets/css/timepicker.css',
							'admin_assets/components/colorpicker/css/colorpicker.css',
							'admin_assets/components/elfinder/css/elfinder.css',
							'admin_assets/components/datatables/dataTables.css',
							'admin_assets/components/validationEngine/validationEngine.jquery.css',
							'admin_assets/components/jscrollpane/jscrollpane.css',
							'admin_assets/components/fancybox/jquery.fancybox.css',
							'admin_assets/components/tipsy/tipsy.css',
							'admin_assets/components/editor/jquery.cleditor.css',
							'admin_assets/components/chosen/chosen.css',
							'admin_assets/components/confirm/jquery.confirm.css',
							'admin_assets/components/sourcerer/sourcerer.css',
							'admin_assets/components/fullcalendar/fullcalendar.css',
							'admin_assets/components/Jcrop/jquery.Jcrop.css',
						));
?>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="<?php echo Yii::app()->getBaseUrl()?>/admin_assets/admin_assets/components/flot/excanvas.min.js"></script><![endif]-->					

<script type="text/javascript">
	var baseUrl = "<?php echo Yii::app()->request->baseUrl;?>/admin_assets/";
	var siteUrl = '/';
</script>
<?php Yii::app()->clientScript->registerCoreScript('jquery');?>
<?php Helpers::yiiJs(array('admin_assets/js/jquery.min.js',
						   'admin_assets/js/jquery.ui.1.11.1.js',
						   'admin_assets/components/ui/jquery.ui.min.js',
						   'admin_assets/components/ui/jquery.autotab.js', 
						   'admin_assets/components/ui/timepicker.js', 
						   'admin_assets/components/colorpicker/js/colorpicker.js',
						   'admin_assets/components/checkboxes/iphone.check.js',
						   'admin_assets/components/elfinder/js/elfinder.full.js',
						   'admin_assets/components/datatables/dataTables.min.js',
						   'admin_assets/components/scrolltop/scrolltopcontrol.js',
						   'admin_assets/components/fancybox/jquery.fancybox.js',
						   'admin_assets/components/jscrollpane/mousewheel.js',
						   'admin_assets/components/jscrollpane/mwheelIntent.js',
						   'admin_assets/components/jscrollpane/jscrollpane.min.js',
						   'admin_assets/components/spinner/ui.spinner.js',
						   'admin_assets/components/tipsy/jquery.tipsy.js',
						   'admin_assets/components/editor/jquery.cleditor.js',
						   'admin_assets/components/chosen/chosen.js',
						   'admin_assets/components/confirm/jquery.confirm.js',
						   'admin_assets/components/validationEngine/jquery.validationEngine.js',
						   'admin_assets/components/validationEngine/jquery.validationEngine-en.js',
						   'admin_assets/components/vticker/jquery.vticker-min.js',
						   'admin_assets/components/sourcerer/sourcerer.js',
						   'admin_assets/components/fullcalendar/fullcalendar.js',
						   'admin_assets/components/flot/flot.js',
						   'admin_assets/components/flot/flot.pie.min.js',
						   'admin_assets/components/flot/flot.resize.min.js',
						   'admin_assets/components/flot/graphtable.js',
						   'admin_assets/components/uploadify/swfobject.js',
						   'admin_assets/components/uploadify/uploadify.js',
						   'admin_assets/components/checkboxes/customInput.jquery.js',
						   'admin_assets/components/effect/jquery-jrumble.js',
						   'admin_assets/components/filestyle/jquery.filestyle.js',
						   'admin_assets/components/placeholder/jquery.placeholder.js',
						   'admin_assets/components/Jcrop/jquery.Jcrop.js',
						   'admin_assets/components/imgTransform/jquery.transform.js',
						   'admin_assets/components/webcam/webcam.js',
						   'admin_assets/components/rating_star/rating_star.js',
						   'admin_assets/components/dualListBox/dualListBox.js',
						   'admin_assets/components/smartWizard/jquery.smartWizard.min.js',
						   'admin_assets/js/jquery.cookie.js',
						   'admin_assets/js/zice.custom.js'
        			));
?>
    </head>        
    
        <body class="dashborad">        
        <div id="alertMessage" class="error"></div> 
                       <?php if(Yii::app()->user->hasFlash('success')) { ?>
                       <script type="text/javascript">
                       showSuccess("<?php echo Yii::app()->user->getFlash('success');?>", 1000);
                       </script>
                       <?php } else if(Yii::app()->user->hasFlash('error')) { ?>
                       <script type="text/javascript">
                       showError("<?php echo Yii::app()->user->getFlash('error');?>", 1000);
                        </script>
                       <?php } ?>
                       
        <div id="header" >
                <div id="account_info"> 
                    <img src="<?php echo Yii::app()->getBaseUrl()?>/admin_assets/images/avatar.png" alt="Online" class="avatar" />
					<div class="setting" title="Profile Setting">
						<a href="<?php echo Yii::app()->getBaseUrl()?>/admin/adminSettings">
							<b>Welcome, </b> 
							<b class="red"><?php echo Yii::app()->user->getState('email');?></b>
							<img src="<?php echo Yii::app()->getBaseUrl()?>/admin_assets/images/gear.png" class="gear"  alt="Profile Setting" /></a>
					</div>
					
					<div class="logout" title="Disconnect">
						<b >Logout</b> 
						<img src="<?php echo Yii::app()->getBaseUrl()?>/admin_assets/images/connect.png" name="connect" class="disconnect" alt="disconnect" />
					</div> 
                </div>
                
            </div> <!--//  header -->
            
			<div id="shadowhead"></div>
            <div id="hide_panel"> 
                  <a class="butAcc" rel="0" id="show_menu"></a>
                  <a class="butAcc" rel="1" id="hide_menu"></a>
                  <a class="butAcc" rel="0" id="show_menu_icon"></a>
                  <a class="butAcc" rel="1" id="hide_menu_icon"></a>
            </div>           
                   
                  <div id="left_menu">
                    <ul id="main_menu" class="main_menu">
                    
                    <?php if (Yii::app()->user->role == 1):?>
                      <li class="limenu <?php echo 'dashboard'==Yii::app()->controller->id ?'select':'';?>" ><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/dashboard"><span class="ico gray shadow home" ></span><b>Dashboard</b></a></li>
                       
                      <li class="limenu <?php echo 'contact'== Yii::app()->controller->id ?'select':'';?>" ><a href="javascript:void(0);"><span class="ico gray shadow notepad" ></span><b>Forms</b></a>
                      	<ul>
                      	
                      		<li><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/contact">Contacts</a></li>
                      		<li><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/quote">Quotes</a></li>
                      		<li><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/newsletter">Newsletters</a></li>
                      	</ul>
                      
                      </li>
                    
                    <li class="limenu <?php echo 'media'== Yii::app()->controller->id ?'select':'';?>" ><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/media"><span class="ico gray shadow photo_album" ></span><b>Media</b></a>
						<ul>
							<li><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/media">Images</a></li>
							<li><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/media/pdf">PDFs</a></li>
						</ul>                    	
					</li>
					
                    <li class="limenu <?php echo 'cms'== Yii::app()->controller->id ?'select':'';?>" ><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/cms"><span class="ico gray shadow diary" ></span><b>CMS</b></a>
						<ul>
							<li><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/cms">View All</a></li>
							<li><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/cms/add">Add a Page</a></li>
						</ul>                    	
					</li>
                   <?php endif; ?> 
                    
                    <li class="limenu <?php echo 'datacard'== Yii::app()->controller->id ?'select':'';?>" ><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/datacard"><span class="ico gray shadow barcode" ></span><b>Data-Cards</b></a>
						<ul>
							<li><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/datacard">View All</a></li>
							<li><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/datacard/add">Add Datacard</a></li>
						</ul>                    	
					</li>
					
					<?php if (Yii::app()->user->role == 1):?>
					<li class="limenu <?php echo 'menu'== Yii::app()->controller->id ?'select':'';?>" ><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/menu"><span class="ico gray shadow paragraph_justify" ></span><b>Menu Bar</b></a></li>
                       <li class="limenu <?php echo 'adminSettings'== Yii::app()->controller->id ?'select':'';?>" ><a href="<?php echo Yii::app()->request->baseUrl; ?>/admin/adminSettings"><span class="ico gray shadow gear" ></span><b>admin Settings</b></a></li>
                    <?php endif;?>
                   </ul>
              </div>
          
            
            <div id="content">
                <div class="inner">
					<div class="topcolumn">
						<div class="logo">
							<img src="<?php echo Yii::app()->request->baseUrl; ?>/admin_assets/images/logo.png" alt="<?php echo Yii::app()->name;?>" />
						</div>
						
						<ul id="shortcut">
							<li> <a title="Contact count" href="<?php echo Yii::app()->request->baseUrl; ?>/admin/contact/index?Contacts[type]=1&yt0=Search"> <img alt="Contact" src="<?php echo Yii::app()->request->baseUrl; ?>/admin_assets/images/icon/shortcut/mail.png">
								<h6>Contacts</h6>
								<h1>
								<?php 
									$contact = Contacts::model()->findAllByAttributes(array('type'=>'1'));
									echo count($contact);
								?>
								</h1>						
							</a> </li>
							
							<li> <a title="DataCards count" href="<?php echo Yii::app()->request->baseUrl; ?>/admin/contact/index?Contacts[type]=2&yt0=Search"> <img alt="DataCards count" src="<?php echo Yii::app()->request->baseUrl; ?>/admin_assets/images/icon/shortcut/graph.png">
								<h6>Datacards</h6>
								<h1>
								<?php 
									$dc = Contacts::model()->findAllByAttributes(array('type'=>'2'));
									echo count($dc);
								?>
								</h1>						
							</a> </li>
							
							<li> <a title="Newsletters" href="<?php echo Yii::app()->request->baseUrl; ?>/admin/newsletter"> <img alt="Newsletters count" src="<?php echo Yii::app()->request->baseUrl; ?>/admin_assets/images/icon/shortcut/setting.png">
								<h6>Newsletters</h6>
								<h1>
								<?php 
									$nl = Newsletters::model()->findAll();
									echo count($nl);
								?>
								</h1>						
							</a> </li>
							
							
							<li> <a title="Free Quote" href="<?php echo Yii::app()->request->baseUrl; ?>/admin/quote"> <img alt="Free Quote count" src="<?php echo Yii::app()->request->baseUrl; ?>/admin_assets/images/icon/shortcut/home.png">
								<h6>Free-Quote</h6>
								<h1>
								<?php 
									$qt = Quotes::model()->findAll();
									echo count($qt);
								?>
								</h1>						
							</a> </li>
							
							
						</ul>
                            
					</div>
					<div class="topcolumn">
                    	<h5>Total CMS Pages : <?php echo count(Cms::model()->findAllByAttributes(array('is_datacard'=>'0')))?> &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; Total Datacards Pages : <?php echo count(Cms::model()->findAllByAttributes(array('is_datacard'=>'1')))?></h5> 
                    </div>
                    <div class="clear"></div>
                    
                    
	<?php echo $content; ?>


                   <div class="clear"></div>
                    <div id="footer"> &copy; Copyright <?php echo date('Y');?> <span class="tip"><a  href="#" title="<?php echo Yii::app()->name;?>" ><?php echo Yii::app()->name;?></a> </span> </div>
                </div> <!--// End inner -->
            </div> <!--// End content -->
            <script src="<?php echo Yii::app()->request->baseUrl; ?>/admin_assets/js/jquery.sortable.js"></script>
            
            <script>

			$(document).ready(function(){
				$('a.Delete_contact').each(function(){;
					href = $(this).prop('href');
					str1 = href.split('?');
					var newUrl = str1[0]+"/?"+str1[1];
					$(this).prop('href',newUrl);
				});
			});

            </script>  
</body>
</html>